package com.dayu.finecomm.iot.params;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 采集数据查询参数
 * 
 * @author XuJialiang
 * @since 2017-09-06 15:45:12
 * @version V1.0.0
 */
public class IotQueryDataParam extends IotPlatParam {
	@JSONField(name = "deviceId")
	public String deviceId;

	@JSONField(name = "startTime")
	public String startTime;

	@JSONField(name = "endTime")
	public String endTime;

	public static class QueryDevicesCond {
		@JSONField(name = "gatewayId")
		public String gatewayId;

		@JSONField(name = "pageNo")
		public int pageNo = -1;

		@JSONField(name = "nodeType")
		public String nodeType;

		@JSONField(name = "deviceType")
		public String deviceType;

		@JSONField(name = "pageSize")
		public int pageSize = -1;

		@JSONField(name = "status")
		public String status;

		@JSONField(name = "startTime")
		public String startTime;

		@JSONField(name = "endTime")
		public String endTime;

		@JSONField(name = "sort")
		public String sort;
	}

	@JSONField(name = "devsCond")
	public QueryDevicesCond devsCond;

	public static class QueryDeviceCond {
		@JSONField(name = "deviceId")
		public String deviceId;
	}

	@JSONField(name = "devCond")
	public QueryDeviceCond devCond;

	public static class QueryHistoryCond {
		@JSONField(name = "deviceId")
		public String deviceId;

		@JSONField(name = "gatewayId")
		public String gatewayId;

		@JSONField(name = "serviceId")
		public String serviceId;

		@JSONField(name = "pageNo")
		public int pageNo = -1;

		@JSONField(name = "pageSize")
		public int pageSize = -1;

		@JSONField(name = "startTime")
		public String startTime;

		@JSONField(name = "endTime")
		public String endTime;
	}

	@JSONField(name = "historyCond")
	public QueryHistoryCond historyCond;

	public static class QueryCapabilityCond {
		@JSONField(name = "deviceId")
		public String deviceId;
	}

	@JSONField(name = "capabilityCond")
	public QueryCapabilityCond capabilityCond;

	public static class Subscribe {
		@JSONField(name = "subsbindDevice")
		public int subsbindDevice = 0;

		@JSONField(name = "subsdeviceDataChanged")
		public int subsdeviceDataChanged = 0;

		@JSONField(name = "subsdeviceDeleted")
		public int subsdeviceDeleted = 0;

		@JSONField(name = "subscommandRsp")
		public int subscommandRsp = 0;

		@JSONField(name = "subsdeviceDatasChanged")
		public int subsdeviceDatasChanged = 0;
	}

	@JSONField(name = "subscribe")
	public Subscribe subscribe;
}
